import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/login',
      name: 'login',
      component: () => import('../views/login/LoginView.vue')
    },
    {
      path: '/',
      component: () => import('../views/layout/LayoutContainer.vue'),
      redirect: 'dashboard',
      children: [
        {
          path: 'dashboard',
          name: 'Dashboard',
          component: () => import('../views/business/dashboard/Dashboard.vue')
        },
        {
          path: 'admission',
          name: 'Admission',
          component: () => import('../views/business/admission/Admission.vue')
        },
        {
          path: 'discharge',
          name: 'Discharge',
          component: () => import('../views/business/discharge/Discharge.vue')
        },
        {
          path: 'beds',
          name: 'Beds',
          component: () => import('../views/business/bed/Beds.vue')
        },
        {
          path: 'patients',
          name: 'Patients',
          component: () => import('../views/business/patient/Patients.vue')
        },
        {
          path: 'doctors',
          name: 'Doctors',
          component: () => import('../views/business/doctor/Doctors.vue')
        },
        {
          path: 'treatment',
          name: 'Treatment',
          component: () => import('../views/business/treatment/Treatment.vue')
        }
      ]
    }
  ]
})

export default router
